import dota_utils as util
import os

labelparent = '/mnt/cv/Datasets/DOTA/train_label_hbb'
labels = set()
filenames = util.GetFileFromThisRootDir(labelparent)
for file in filenames:
    basename = util.custombasename(file)
    # annotations
    objects = util.parse_dota_poly2(file)
    for obj in objects:
        labels.add(obj['name'])
print(list(labels))
print(len(labels))


